<template>
  <div class="center-cmp" id="forgeViewer">
    <!-- <div class="cc-header">
      <dv-decoration-1 style="width:200px;height:50px;" />
      <div>xxxxxx</div>
      <dv-decoration-1 style="width:200px;height:50px;" />
    </div> -->
    <!-- 
    <div class="cc-details">
      <div>总数</div>
      <div class="card">2</div>
      <div class="card">1</div>
      <div class="card">3</div>
      <div class="card">7</div>
    </div> -->

    <div class="cc-main-container">
      <!-- <div class="ccmc-left">
        <div class="station-info">
          收费站<span>1315</span>
        </div>
        <div class="station-info">
          监控中心<span>415</span>
        </div>
      </div> -->

      <!-- <dv-active-ring-chart class="ccmc-middle"
                            :config="config" /> -->
      <dv-flyline-chart-enhanced
        :config="flyConfig"
        style="width:100%;height:100%;"
      />
      <!-- <div class="ccmc-right">
        <div class="station-info">
          <span>90</span>道路外场
        </div>
        <div class="station-info">
          <span>317</span>其他
        </div>
      </div> -->

      <!-- <LabelTag :config="labelConfig" /> -->
    </div>
  </div>
</template>

<script>
import LabelTag from "./LabelTag";

export default {
  name: "CenterCmp",
  components: {
    LabelTag
  },
  data() {
    return {
      config: {
        data: [
          {
            name: "收费站",
            value: 1315
          },
          {
            name: "监控中心",
            value: 415
          },
          {
            name: "道路外场",
            value: 90
          },
          {
            name: "其他",
            value: 317
          }
        ],
        color: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
        lineWidth: 30,
        radius: "55%",
        activeRadius: "60%"
      },
      flyConfig: {
        points: [
          {
            name: "郑州",
            coordinate: [0.48, 0.35],
            halo: {
              show: true
            },
            icon: {
              src:
                "http://datav-react.jiaminghi.com/img/flylineChart/mapCenterPoint.png",
              width: 30,
              height: 30
            },
            text: {
              show: false
            }
          },
          {
            name: "新乡",
            coordinate: [0.52, 0.23]
          },
          {
            name: "焦作",
            coordinate: [0.43, 0.29]
          },
          {
            name: "开封",
            coordinate: [0.59, 0.35]
          },
          {
            name: "许昌",
            coordinate: [0.53, 0.47]
          },
          {
            name: "平顶山",
            coordinate: [0.45, 0.54]
          },
          {
            name: "洛阳",
            coordinate: [0.36, 0.38]
          },
          {
            name: "周口",
            coordinate: [0.62, 0.55],
            halo: {
              show: true,
              color: "#8378ea"
            }
          },
          {
            name: "漯河",
            coordinate: [0.56, 0.56]
          },
          {
            name: "南阳",
            coordinate: [0.37, 0.66],
            halo: {
              show: true,
              color: "#37a2da"
            }
          },
          {
            name: "信阳",
            coordinate: [0.55, 0.81]
          },
          {
            name: "驻马店",
            coordinate: [0.55, 0.67]
          },
          {
            name: "济源",
            coordinate: [0.37, 0.29]
          },
          {
            name: "三门峡",
            coordinate: [0.2, 0.36]
          },
          {
            name: "商丘",
            coordinate: [0.76, 0.41]
          },
          {
            name: "鹤壁",
            coordinate: [0.59, 0.18]
          },
          {
            name: "濮阳",
            coordinate: [0.68, 0.17]
          },
          {
            name: "安阳",
            coordinate: [0.59, 0.1]
          }
        ],
        lines: [
          {
            source: "新乡",
            target: "郑州"
          },
          {
            source: "焦作",
            target: "郑州"
          },
          {
            source: "开封",
            target: "郑州"
          },
          {
            source: "周口",
            target: "郑州",
            color: "#fb7293",
            width: 2
          },
          {
            source: "南阳",
            target: "郑州",
            color: "#fb7293",
            width: 2
          },
          {
            source: "济源",
            target: "郑州"
          },
          {
            source: "三门峡",
            target: "郑州"
          },
          {
            source: "商丘",
            target: "郑州"
          },
          {
            source: "鹤壁",
            target: "郑州"
          },
          {
            source: "濮阳",
            target: "郑州"
          },
          {
            source: "安阳",
            target: "郑州"
          },
          {
            source: "许昌",
            target: "南阳",
            color: "#37a2da"
          },
          {
            source: "平顶山",
            target: "南阳",
            color: "#37a2da"
          },
          {
            source: "洛阳",
            target: "南阳",
            color: "#37a2da"
          },
          {
            source: "驻马店",
            target: "周口",
            color: "#8378ea"
          },
          {
            source: "信阳",
            target: "周口",
            color: "#8378ea"
          },
          {
            source: "漯河",
            target: "周口",
            color: "#8378ea"
          }
        ],
        icon: {
          show: true,
          src: "http://datav-react.jiaminghi.com/img/flylineChart/mapPoint.png"
        },
        text: {
          show: true
        },
        k: 0.5,
        bgImgSrc: "http://datav-react.jiaminghi.com/img/flylineChart/map.jpg"
      },
      labelConfig: {
        data: ["收费站", "监控中心", "道路外场", "其他"]
      }
    };
  },
  created() {}
};
</script>

<style lang="scss">
.center-cmp {
  width: 100%;
  height: 100%;
  margin: 0px;
  padding: 0px;
  display: flex;
  flex-direction: column;

  .cc-header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 30px;
  }

  .cc-details {
    height: 120px;
    display: flex;
    justify-content: center;
    font-size: 32px;
    align-items: center;

    .card {
      background-color: rgba(4, 49, 128, 0.6);
      color: #08e5ff;
      height: 70px;
      width: 70px;
      font-size: 45px;
      font-weight: bold;
      line-height: 70px;
      text-align: center;
      margin: 10px;
    }
  }

  .cc-main-container {
    position: relative;
    flex: 1;
    display: flex;

    .ccmc-middle {
      width: 50%;
      height: 90%;

      .active-ring-name {
        font-size: 20px !important;
      }
    }

    .ccmc-left,
    .ccmc-right {
      width: 25%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      font-size: 24px;

      span {
        font-size: 40px;
        font-weight: bold;
      }

      .station-info {
        height: 80px;
        display: flex;
        align-items: center;
      }
    }

    .ccmc-left {
      align-items: flex-end;

      span {
        margin-left: 20px;
      }
    }

    .ccmc-right {
      align-items: flex-start;

      span {
        margin-right: 20px;
      }
    }
  }

  .label-tag {
    position: absolute;
    width: 500px;
    height: 30px;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
  }
}
</style>
